package lightswitch.client.code.util;

public class StatementType {
    public static String INSERT = "insert";
    public static String SELECT = "select";
    public static String UPDATE = "update";
    public static String DELETE = "delete";
    public static String NOT_SUPPORT = "not_support";
    public static String CLASS_NOT_FOUND = "class_not_found";
    public static String IOERROR = "IO_error";
    public static String getStatementType(String str){
        String normal = StringHelper.NormalizeString(str);
        String[] temp = normal.split(" ");
        if (temp[0].equals(INSERT)){
            return INSERT;
        } else if (temp[0].equals(SELECT)){
            return SELECT;
        } else if (temp[0].equals(UPDATE)){
            return UPDATE;
        } else if (temp[0].equals(DELETE)){
            return DELETE;
        } else{
            return NOT_SUPPORT;
        }
    }
}
